package beautyofprogramming.digitalbeauty;
public class TestFactorial {

	/**
	 * 
	 */
	public int countZero(int n){
		if(n<10&&n>=5)
			return 1;
		else if(n<5)
			return 0;
		else
			return count(n);
//		String str = n+"";
	}
	public int count(int n){
		if(n<10&&n>5)
			return 1;
		if(n<5)
			return 0;
		int intLen = (int) Math.log10(n);	//n��λ��-1
		int num = 0;
		if(intLen == 0)
			num = n/5;
		return intLen ;
	}
	public int countB(int n){	//���˵�һλ�����涼Ϊ��   �磺800
		int intLen = (int) Math.log10(n);
		
		return 0;
	}
	
	public int counts(int n){
		int counts = 0;
		for(int i=5;i<=n;i += 5){
			int a = i;
			while(a%5 == 0){
				counts++;
				a = a /5 ;
			}
		}
		return counts;
		
	}
	
	public static void main(String[] args) {
		TestFactorial test = new TestFactorial();
		System.out.println(test.counts(50));

	}

}
